-- GENERATED SPELL FOR [Crypt Reaver] --


function spell0_15978(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40504,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15978', 682, 1)
end

function spell1_15978(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(56625,pUnit)
pUnit:RegisterEvent('Sorts_15978', 617, 1)
end

function Sorts_15978(pUnit, Event)
local choix_sorts_15978 = math.random(0, 1)
if choix_sorts_15978 == 0 then
pUnit:RegisterEvent('spell0_15978', 1, 1)
end
if choix_sorts_15978 == 1 then
pUnit:RegisterEvent('spell1_15978', 1, 1)
end
end

function mob15978_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15978', math.random(1500, 3000), 1)
end

function mob15978_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15978_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15978_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15978, 1, 'mob15978_Action')
RegisterUnitEvent(15978, 2, 'mob15978_Leave')
RegisterUnitEvent(15978, 3, 'mob15978_Kill')
RegisterUnitEvent(15978, 4, 'mob15978_Die')
